<!--
 * @FileDescription 诊断仪
 * @Author lz
 * @Date 20230612 15:21:31
 * @LastEditors lz
 * @LastEditTime 20230612 15:21:31
-->
<template>
    <div class="Dia_wp">
        <div class="Popup">
            <div class="titBox">
                诊断仪
                <span class="txt">数据流</span>
                <close-outlined class="cancel" @click="cancel" />
                <img src="/public/images/新增紧急/诊断仪-diagnostic-apparatus/返回.png" class="return" @click="returnKey" />
            </div>
            <div class="pop_cont">
                <div class="tit_list">
                    <div class="t1">名称</div>
                    <div class="t2">值</div>
                    <div class="t3">单位</div>
                </div>
                <div class="listBox">
                    <div class="pop_list" v-for="(item, index) in HomeContent.Default.DataFlowData.value" :key="index">
                        <div class="t1 BN">
                            {{ item.Name }}
                        </div>
                        <div class="t2 BN">
                            {{ item.State }}
                        </div>
                        <div class="t3 BN">
                            {{ item.Unit }}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { CloseOutlined } from "@ant-design/icons-vue";
import { ClientMessage } from "../../../../runtime/generate/message/ClientMessage";
import WebSocketComponent from "../../../../runtime/module/WebSocket/WebSocketComponent";
import { onMounted, reactive, ref } from "vue";
import HomeContent from "../HomeContent";
import MessageCode from "../MessageCode";
const state = reactive({
    tabList: <any>[],
    DetailedData: <any>[],
});
const flowData: any = ref();
const choice: any = ref(0);
//关闭
function cancel() {
    WebSocketComponent.Default.PostMessage(
        new ClientMessage.DiagnosisAdapterMessage(
            MessageCode.Default.MsgCodesList.DIAGNOSTIC_DECODER_CLOSE
        )
    );
    HomeContent.Default.DiagnosShow.value = false;
    HomeContent.Default.DataFlow.value = false;
    HomeContent.Default.ReadDefaultCode.value = false;
}
// 返回
function returnKey() {
    HomeContent.Default.DataFlow.value = false;
    HomeContent.Default.DiagnosShow.value = true;
}
</script>

<style scoped>
.Dia_wp {
    width: 100%;
    height: 100%;
    background-color: rgb(0, 0, 0, 0.1);
    position: relative;
}

.Popup {
    width: 1220px;
    height: 660px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -60%);
    background: #ffffff;
    border-radius: 16px 16px 16px 16px;
}

.titBox {
    height: 54px;
    font-size: 36px;
    font-weight: 600;
    color: #000000;
    line-height: 42px;
    margin-top: 30px;
    margin-left: 40px;
}

.txt {
    color: #000000;
    font-size: 28px;
    font-weight: 600;
    margin-left: 14px;
}

.cancel {
    font-size: 28px;
    font-weight: 600;
    float: right;
    margin-top: 4px;
    margin-right: 30px;
}

.return {
    position: absolute;
    right: 76px;
}

.pop_cont {
    width: 100%;
    height: 500px;
}

.tit_list {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    height: 44px;
    line-height: 42px;
    margin-left: 40px;
}

.pop_list {
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    height: 53px;
    text-align: center;
    line-height: 52px;
    overflow: hidden;
    margin-left: 40px;
}

.t1 {
    width: 312px;
    float: left;
    background: #f7f8fb;
    border: 1px solid #ede8f4;
    border-radius: 10px 0 0 0;
}

.t2 {
    width: 208px;
    float: left;
    background: #f7f8fb;
    border-top: 1px solid #ede8f4;
    border-bottom: 1px solid #ede8f4;
}

.t3 {
    width: 620px;
    height: 100%;
    float: left;
    background: #f7f8fb;
    border: 1px solid #ede8f4;
    border-radius: 0 10px 0 0;
}

.listBox {
    width: 98.5%;
    overflow-y: auto;
    height: 450px;
}

.listBox::-webkit-scrollbar {
    width: 6px;
    height: 1px;
}

.listBox::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #dfe1e8;
}

.listBox::-webkit-scrollbar-track {
    border-radius: 10px;
    background: #f8f8f8;
}

.BN {
    background: none;
    border-radius: 0;
    border-bottom: 1px solid #ede8f4;
    border-top: none;
}

.footer {
    height: 78px;
    width: 100%;
    margin-top: -6px;
    border-top: 1px solid #ede8f4;
    position: relative;
}

.cleanUp {
    width: 156px;
    height: 48px;
    line-height: 46px;
    font-size: 16px;
    font-weight: 500;
    color: #202020;
    background: #ffffff;
    border-radius: 6px 6px 6px 6px;
    opacity: 1;
    border: 1px solid #e9e9e9;
    position: absolute;
    bottom: 12px;
    left: 440px;
}

.read {
    width: 156px;
    height: 48px;
    line-height: 46px;
    font-size: 16px;
    font-weight: 500;
    color: #202020;
    background: #9bfb4e;
    border-radius: 6px 6px 6px 6px;
    opacity: 1;
    position: absolute;
    right: 440px;
    bottom: 12px;
}

.getFlow {
    width: 156px;
    height: 48px;
    line-height: 46px;
    font-size: 16px;
    font-weight: 500;
    color: #202020;
    background: pink;
    border-radius: 6px 6px 6px 6px;
    opacity: 1;
    position: absolute;
    right: 0px;
    bottom: 12px;
}

.btn_ico {
    width: 24px;
    margin-top: -4px;
    margin-left: 20px;
}
</style>